﻿<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<title>Building, Integrating, and Deploying ClearScript</title>
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:0in;
	margin-bottom:.0001pt;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
h1
	{mso-style-link:"Heading 1 Char";
	margin-top:10.0pt;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:0in;
	margin-bottom:.0001pt;
	line-height:115%;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Cambria",serif;
	color:#365F91;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{mso-style-link:"Header Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{mso-style-link:"Footer Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
	{mso-style-link:"Title Char";
	margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:15.0pt;
	margin-left:0in;
	border:none;
	padding:0in;
	font-size:26.0pt;
	font-family:"Cambria",serif;
	color:#17365D;
	letter-spacing:.25pt;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
	{mso-style-link:"Title Char";
	margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:0in;
	margin-bottom:.0001pt;
	border:none;
	padding:0in;
	font-size:26.0pt;
	font-family:"Cambria",serif;
	color:#17365D;
	letter-spacing:.25pt;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
	{mso-style-link:"Title Char";
	margin:0in;
	margin-bottom:.0001pt;
	border:none;
	padding:0in;
	font-size:26.0pt;
	font-family:"Cambria",serif;
	color:#17365D;
	letter-spacing:.25pt;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
	{mso-style-link:"Title Char";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:15.0pt;
	margin-left:0in;
	border:none;
	padding:0in;
	font-size:26.0pt;
	font-family:"Cambria",serif;
	color:#17365D;
	letter-spacing:.25pt;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
	{margin-top:6.0pt;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.TitleChar
	{mso-style-name:"Title Char";
	mso-style-link:Title;
	font-family:"Cambria",serif;
	color:#17365D;
	letter-spacing:.25pt;}
span.Heading1Char
	{mso-style-name:"Heading 1 Char";
	mso-style-link:"Heading 1";
	font-family:"Cambria",serif;
	color:#365F91;
	font-weight:bold;}
span.HeaderChar
	{mso-style-name:"Header Char";
	mso-style-link:Header;}
span.FooterChar
	{mso-style-name:"Footer Char";
	mso-style-link:Footer;}
.MsoChpDefault
	{font-family:"Calibri",sans-serif;}
.MsoPapDefault
	{margin-bottom:10.0pt;
	line-height:115%;}
 /* Page Definitions */
 @page WordSection1
	{size:8.5in 11.0in;
	margin:.5in .5in .5in .5in;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple style="background-color: gray">

<div class=WordSection1 style="width: 9in; margin: auto; zoom: 1.2; background-color: white; padding: .25in">

<div style='border:none;border-bottom:solid #4F81BD 1.0pt;padding:0in 0in 4.0pt 0in'>

<p class=MsoTitle style='margin-top:0in'>Building, Integrating, and Deploying
ClearScript</p>

</div>

<h1 style='margin-left:.5in;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
</span>I. Introduction</h1>

<p class=MsoNormal style='margin-left:.25in'>Welcome to ClearScript!</p>

<p class=MsoNormal style='margin-left:.25in'>ClearScript is a library that
allows you to add scripting to your .NET applications. It supports <a
href="https://msdn.microsoft.com/en-us/library/hbxc2t98(v=vs.84).aspx">JScript</a>
and <a href="https://msdn.microsoft.com/en-us/library/t0aew7h6(v=vs.84).aspx">VBScript</a>
out of the box and in theory can work with other <a
href="http://msdn.microsoft.com/en-us/library/bb871518.aspx">Windows Script</a>
engines.</p>

<p class=MsoNormal style='margin-left:.25in'>ClearScript 5 adds support for the
<a href="https://developers.google.com/v8/">V8</a> high-performance open-source
JavaScript engine. It allows you to use V8 with the same managed API and host
integration features as JScript and VBScript. V8 provides better performance,
however, and is more suitable for multi-threaded applications and asynchronous
server-side scripting.</p>

<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'> </span>II.
Building ClearScript</h1>

<p class=MsoNormal style='margin-left:.25in'>The provided project and solution
files support Visual Studio <a
href="https://www.visualstudio.com/vs/older-downloads/">2015</a> and <a
href="https://www.visualstudio.com/downloads/">2017</a>. They produce
architecture-neutral managed libraries that target .NET Framework 4.5.
ClearScript does not support older environments. The output directory is <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>bin\[Debug|Release]</span></b>.</p>

<p class=MsoNormal style='margin-left:.25in'>There are two ways to build
ClearScript – with and without V8 support. If you don't need V8 support, simply
build the <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript.NoV8</span></b>
solution using Visual Studio. Note that this solution does not include test
projects.</p>

<p class=MsoNormal style='margin-left:.25in'>In order to build full ClearScript
with V8 support, you must first acquire, build, and import V8:</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:#00B050'>Note:</span></b> This procedure and the V8Update script
are provided for your convenience. ClearScript does not include V8 source code,
nor does it come with any third-party software required to download and build
V8. Rights to V8 and its prerequisites are provided by their rights holders.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> Because of changes in V8 5.4, this procedure
and the V8Update script now require a 64-bit operating system. Once built,
ClearScript can still be deployed in a 32-bit environment.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> Although ClearScript still supports Visual
Studio 2015, V8 and the V8Update script now require Visual Studio 2017.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
<a href="http://www.git-scm.com/download/win">Git</a>. Ensure that Git is added
to your executable path by selecting the option <b>Use Git from the Windows
Command Prompt</b>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
the latest Python 2.x from <a href="http://www.python.org/downloads/">here</a>
and add it to your executable path. V8's build process requires at least Python
2.7 and does not support Python 3.x.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>6.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Unzip
or clone the <a href="https://github.com/Microsoft/ClearScript">ClearScript
source code</a> into a convenient directory. <b><span style='color:red'>Important:</span></b>
Ensure that the path to your ClearScript root directory does not contain any
non-ASCII characters.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>7.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Ensure
that your Visual Studio installation includes C++ support.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>8.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Open
a <a href="https://www.visualstudio.com/downloads/">Visual Studio 2017</a>
developer command prompt and run the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>V8Update</span></b> script from your
ClearScript root directory:</p>

<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>C:\ClearScript&gt; V8Update [/N]
[Debug|Release] [Latest|Tested|&lt;Revision&gt;]</span></b></p>

<p class=MsoNormal style='margin-left:.75in'>This script downloads the V8
source code and its prerequisites, builds 32-bit and 64-bit V8 shared
libraries, and imports the results into ClearScript. It requires approximately
3GB of additional disk space and does not perform any permanent software
installation on your machine.</p>

<p class=MsoNormal style='margin-left:.75in'>The optional <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>/N</span></b>
flag causes V8Update to reuse previously downloaded files if possible. It's
useful for switching between Debug and Release versions of V8 and for testing
local V8 modifications.</p>

<p class=MsoNormal style='margin-left:.75in'>Specifying <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>Debug</span></b>
or <b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>Release</span></b>
is optional; the default is <b><span style='font-size:10.0pt;line-height:115%;
font-family:Consolas'>Release</span></b>. The selected V8 variant will then be
used for all ClearScript configurations.</p>

<p class=MsoNormal style='margin-left:.75in'>By default, <a name="_Hlk482371988"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8Update</span></b></a>
builds a V8 revision that has been tested with the current version of
ClearScript. If you'd like to use a specific revision instead, place the
desired branch name, commit ID, or tag on the <b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>V8Update</span></b> command line. Browse
<a href="https://chromium.googlesource.com/v8/v8.git">here</a> to view V8's
revision history.</p>

<p class=MsoNormal style='margin-left:.25in'>You are now ready to build the full
<b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript</span></b>
solution using Visual Studio 2015 or 2017.</p>

<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Note:</span></b>
The first time you open the solution, Visual Studio may prompt you to upgrade
one or more projects to the latest platform toolset or .NET Framework. We
recommend that you select <b>Cancel</b> or <b>Don't Upgrade</b>.</p>

<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Optional:</span></b>
The ClearScript repository includes the <a
href="https://microsoft.github.io/ClearScript/Reference/html/R_Project_Reference.htm">ClearScript
Library Reference</a> in HTML and Compiled HTML (.CHM) formats. If you'd like
to rebuild these files, use <a href="https://github.com/EWSoftware/SHFB">Sandcastle
Help File Builder</a> with the provided project files (<b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript\doc\[Web]Reference.shfbproj</span></b>).</p>

<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>III. Building strong-named
ClearScript assemblies (optional)</h1>

<p class=MsoNormal style='margin-left:.25in'>ClearScript now includes optional
support for building strong-named assemblies. Use the following one-time
procedure to enable this feature:</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>If
the ClearScript solution is open in Visual Studio, close it.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Generate
a cryptographic key pair in your ClearScript root directory:</p>

<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><a name="OLE_LINK5"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>C:\ClearScript&gt;
sn -k ClearScript.snk</span></b></a></p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Open
the ClearScript solution in Visual Studio.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
<b>Build</b> &#8594; <b>Transform All T4 Templates</b>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Rebuild
the solution.</p>

<p class=MsoNormal style='margin-left:.25in'>Once you've performed these steps,
the ClearScript assemblies you build will have strong names.</p>

<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>IV. Integrating and deploying
ClearScript with your application</h1>

<p class=MsoNormal style='margin-left:.25in'>Once you've built ClearScript,
here's how to add it to your application:</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Right-click
your project in Visual Studio and select <b>Add Reference</b>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>In
the Reference Manager window, click <b>Browse</b> and locate your ClearScript
output directory (see above). Select <b>ClearScript.dll</b>, click <b>Add</b>,
and then click <b>OK</b> to exit Reference Manager.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> If you're using V8, you must also copy
the following files from your ClearScript output directory to your
application's directory:</p>

<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScriptV8-32.dll</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScriptV8-64.dll</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>v8-base-ia32.dll</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>v8-base-x64.dll</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.0in;margin-bottom:.0001pt;background:#F2F2F2'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>v8-ia32.dll</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.0in;background:#F2F2F2'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas'>v8-x64.dll</span></b></p>

<p class=MsoNormal style='margin-left:.75in'>For ASP.NET projects, we recommend
that you add these assemblies as content files at the root of your web
application and set their <b>Copy to Output Directory</b> properties to <b>Do
not copy</b>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'><a
name="OLE_LINK4"></a><a name="OLE_LINK3">4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span style='color:red'>Important:</span></b> </a>If Visual Studio is
not installed on your deployment machine, you must install 32-bit and 64-bit
Visual C++ Redistributable packages:</p>

<p class=MsoListParagraph style='margin-left:1.0in'><a
href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Visual
C++ Redistributable for Visual Studio 2015</a></p>

<p class=MsoListParagraph style='margin-left:1.0in'>Visual C++ Redistributable
for Visual Studio 2017 <a href="https://go.microsoft.com/fwlink/?LinkId=746572">[x64]</a>
<a href="https://go.microsoft.com/fwlink/?LinkId=746571">[x86]</a></p>

<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'><span style='font:7.0pt "Times New Roman"'>&nbsp;
</span>V. Debugging with ClearScript and V8</h1>

<p class=MsoNormal style='margin-left:.25in'>V8 does not support standard
Windows script debugging. Instead, it implements its own WebSocket-based
debugging protocol. A convenient way to debug JavaScript code running in V8 is
to use the Visual Studio Code IDE:</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
and launch <a href="https://code.visualstudio.com/">Visual Studio Code</a>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Set
up one or more ClearScript V8 debug configurations:</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Launch
Visual Studio Code and click <b>File</b> &#8594; <b>Preferences </b>&#8594;<b> Settings
</b>to open your User Settings file.</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add
the following section to the file:</p>

<p class=MsoNormal style='margin-top:10.0pt;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#9CDCFE'>&quot;launch&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>:
{</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;version&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;0.2.0&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;configurations&quot;</span></b><b><span style='font-size:
10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>: [</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>       
{</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;name&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;Attach
to ClearScript V8 on port 9222&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;type&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;node&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;request&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;attach&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;protocol&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;inspector&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;address&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#CE9178'>&quot;localhost&quot;</span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>,</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>           
</span></b><b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas;
color:#9CDCFE'>&quot;port&quot;</span></b><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>: </span></b><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#B5CEA8'>9222</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>       
}</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
0in;margin-left:1.5in;margin-bottom:.0001pt;background:#1E1E1E'><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas;color:#D4D4D4'>   
]</span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:36.7pt;margin-bottom:
14.0pt;margin-left:1.5in;background:#1E1E1E'><b><span style='font-size:10.0pt;
line-height:115%;font-family:Consolas;color:#D4D4D4'>}</span></b></p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>c.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>You
can specify additional configurations for different hosts, port numbers, and
other options. See <a
href="https://code.visualstudio.com/docs/nodejs/nodejs-debugging">here</a> for
more information.</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>d.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
<b>File</b> &#8594; <b>Save</b>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Enable
script debugging in your application by invoking the <a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngine.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngine</span></b></a>
constructor with <a name="OLE_LINK2"></a><a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.EnableDebugging</span></b></a>
and a TCP port number that matches one of your debug configurations. The
default port number is 9222.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>If
you’d like to debug your application remotely, you must also do the following:</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Construct
your script engine with the additional flag <a
href="https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_V8_V8ScriptEngineFlags.htm"><b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8ScriptEngineFlags.EnableRemoteDebugging</span></b></a>.</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> If necessary, configure your firewall
to allow incoming connections to your TCP port.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Attach
the Visual Studio Code debugger to your application:</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'><a
name="OLE_LINK1">a.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>Click <b>View</b> </a>&#8594; <b>Debug</b> to bring up the Debug view.</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
the appropriate debug configuration at the top of the Debug Side Bar.</p>

<p class=MsoListParagraph style='margin-left:1.25in;text-indent:-.25in'>c.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Click
<b>Debug</b> &#8594; <b>Start Debugging</b>.</p>

<p class=MsoNormal style='margin-left:.5in'><b><span style='color:#00B050'>Note:</span></b>
You can also attach Visual Studio to your application for simultaneous
debugging of script, managed, and native code.</p>

<h1 style='margin-top:14.0pt;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;text-indent:-.5in'>VI. Acknowledgments</h1>

<p class=MsoNormal style='margin-left:.25in'>We’d like to thank:</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a
href="https://code.google.com/p/v8/people/list">The V8 team</a>.</p>

<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a
href="http://kennethreitz.org">Kenneth Reitz</a> for generously providing the <a
href="http://httpbin.org"><b><span style='font-size:10.0pt;line-height:115%;
font-family:Consolas'>Httpbin</span></b></a> service.</p>

</div>

</body>

</html>
